

#include <gtk/gtk.h>
#include "gsim.h"


GtkWidget *gsim_small_close_button_new(gint width, gint hight)
{
	GtkWidget *button,*image;
	gchar *filename;
#ifdef G_OS_WIN32
		filename=g_build_filename (package_pixmaps_dir, "small-close.xpm", NULL);
#else
        filename=g_build_filename (PACKAGE_PIXMAPS_DIR, "small-close.xpm", NULL);
#endif
	
	button=gtk_button_new();
	image=gtk_image_new_from_file(filename);
	g_free(filename);
	
	gtk_container_add(GTK_CONTAINER(button),image);
	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
	gtk_widget_set_size_request( button ,width, hight );
//	gtk_container_set_border_width(GTK_CONTAINER(button),0);
//	gtk_button_set_alignment(GTK_BUTTON(button),0.8,0.5);
	return button;
}


GtkWidget *gsim_small_reset_button_new(gint width, gint hight)
{
	GtkWidget *button,*image;
	gchar *filename;
#ifdef G_OS_WIN32
		filename=g_build_filename (package_pixmaps_dir, "r.xpm", NULL);
#else
        filename=g_build_filename (PACKAGE_PIXMAPS_DIR, "r.xpm", NULL);
#endif
	
	button=gtk_button_new();
	image=gtk_image_new_from_file(filename);
	g_free(filename);
	
	gtk_container_add(GTK_CONTAINER(button),image);
	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
	gtk_widget_set_size_request( button ,width, hight );
//	gtk_container_set_border_width(GTK_CONTAINER(button),0);
//	gtk_button_set_alignment(GTK_BUTTON(button),0.8,0.5);
	return button;
}


GtkWidget *gsim_small_stack_button_new(gint width, gint hight)
{
	GtkWidget *button,*image;
	gchar *filename;
#ifdef G_OS_WIN32
		filename=g_build_filename (package_pixmaps_dir, "s.xpm", NULL);
#else
        filename=g_build_filename (PACKAGE_PIXMAPS_DIR, "s.xpm", NULL);
#endif
	
	button=gtk_button_new();
	image=gtk_image_new_from_file(filename);
	g_free(filename);
	
	gtk_container_add(GTK_CONTAINER(button),image);
	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
	gtk_widget_set_size_request( button ,width, hight );
//	gtk_container_set_border_width(GTK_CONTAINER(button),0);
//	gtk_button_set_alignment(GTK_BUTTON(button),0.8,0.5);
	return button;
}


GtkWidget *gsim_small_dock_button_new(gint width, gint hight)
{
	GtkWidget *button,*image;
	gchar *filename;
#ifdef G_OS_WIN32
		filename=g_build_filename (package_pixmaps_dir, "d.xpm", NULL);
#else
        filename=g_build_filename (PACKAGE_PIXMAPS_DIR, "d.xpm", NULL);
#endif
	
	button=gtk_button_new();
	image=gtk_image_new_from_file(filename);
	g_free(filename);
	
	gtk_container_add(GTK_CONTAINER(button),image);
	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
	gtk_widget_set_size_request( button ,width, hight );
//	gtk_container_set_border_width(GTK_CONTAINER(button),0);
//	gtk_button_set_alignment(GTK_BUTTON(button),0.8,0.5);
	return button;
}


GtkWidget *gsim_find_button_new(gint width, gint hight)
{
	GtkWidget *button,*image;
	gchar *filename;
#ifdef G_OS_WIN32
		filename=g_build_filename (package_pixmaps_dir, "find.png", NULL);
#else
        filename=g_build_filename (PACKAGE_PIXMAPS_DIR, "find.png", NULL);
#endif
	
	button=gtk_button_new();
	image=gtk_image_new_from_file(filename);
	g_free(filename);
	
	gtk_container_add(GTK_CONTAINER(button),image);
	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
	gtk_widget_set_size_request( button ,width, hight );
//	gtk_container_set_border_width(GTK_CONTAINER(button),0);
//	gtk_button_set_alignment(GTK_BUTTON(button),0.8,0.5);
	return button;
}


GtkWidget *gsim_empty_button_new(gint width, gint hight)
{
	GtkWidget *button,*image;
	gchar *filename;
#ifdef G_OS_WIN32
		filename=g_build_filename (package_pixmaps_dir, "extra.xpm", NULL);
#else
        filename=g_build_filename (PACKAGE_PIXMAPS_DIR, "extra.xpm", NULL);
#endif
	
	button=gtk_button_new();
	image=gtk_image_new_from_file(filename);
	g_free(filename);
	
	gtk_container_add(GTK_CONTAINER(button),image);
	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
	gtk_widget_set_size_request( button ,width, hight );
//	gtk_container_set_border_width(GTK_CONTAINER(button),0);
//	gtk_button_set_alignment(GTK_BUTTON(button),0.8,0.5);
	return button;
}
